package co2.bean;

import java.util.Map;

import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;

import org.springframework.context.ApplicationContext;

import co2.engine.SpringUtil;

@ManagedBean(eager=true)
@ApplicationScoped
public class ApplicationBean {

	private ApplicationContext ctx;
	private Object bean;


	public ApplicationBean(){
//		ctx = SpringUtil.getAppContext();
	}
	
	public ApplicationContext getCtx() {
		return ctx;
	}

	public void setCtx(ApplicationContext ctx) {
		this.ctx = ctx;
	}

	public Object getBean(String id) {
		bean = ctx.getBean(id);
		return bean;
	}

	public void setBean(Object bean) {
		this.bean = bean;
	}
	
	
}
